package com.kiteqi.wxorder.service;

import com.kiteqi.wxorder.dto.CartDTO;
import com.kiteqi.wxorder.entity.ProductInfo;

import java.util.List;

public interface ProductService {

    public int save(ProductInfo productInfo);

    public int update(ProductInfo productInfo);

    public ProductInfo findOne(String productId);

    public List<ProductInfo> findAll();

    List<ProductInfo> findUpAll();

    //加库存
    void increaseStock(List<CartDTO> cartDTOList);

    //减库存
    void decreaseStock(List<CartDTO> cartDTOList);

    //上架
    int onSale(String productId);

    //下架
    int offSale(String productId);
}
